package com.airbnb.epoxy;

import ohos.interwork.utils.ParcelableEx;
import ohos.utils.Parcel;
import ohos.utils.ParcelException;

import java.util.List;

public class CarouselData implements ParcelableEx {
  private long id;
  private List<ColorData> colors;

  public CarouselData(long id, List<ColorData> colors) {
    this.id = id;
    this.colors = colors;
  }

  public List<ColorData> getColors() {
    return colors;
  }

  public long getId() {
    return id;
  }

  @Override
  public void marshallingEx(Parcel dest) throws ParcelException {
    dest.writeLong(this.id);
    dest.writeList(this.colors);
  }

  @Override
  public void unmarshallingEx(Parcel in) throws ParcelException {
    this.id = in.readLong();
    this.colors = (List<ColorData>) in.readList();
  }
}
